#include <iostream>

const int size = 10;
class ArrayQueue
{
public:
    ArrayQueue() : front(0), rear(0) {}

    void add(int data);
    void cout();
    bool Iskong();

private:
    int queue[size];
    int front;
    int rear;
};



void ArrayQueue::add(int data)
{
    if (front != size)
        queue[front++] = data;
    else
    {
        std::cout << "队列已满\n";
        return;
    }
}

void ArrayQueue::cout()
{
    if (front == rear)
    {
        std::cout << "队列为空\n";
        return;
    }
    front++;
}

bool ArrayQueue::Iskong()
{
    return front == rear;
}


int main()
{
    ArrayQueue a;
    for(int i=0; i<10; i++)
        a.add(i+1);

    return 0;
}